From a5d6f06e2280806905fba65ad6b74c1f237a5f73 Mon Sep 17 00:00:00 2001 From: Tom Gilder Date: Thu, 6 Oct 2005 01:07:25 +0000 Subject: [PATCH] Separate newarticletext messages for logged in and anon users --- RELEASE-NOTES | 2 +- includes/EditPage.php | 7 +++++-- languages/Language.php | 5 +++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d1b44573bc..e273039b5c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -128,7 +128,7 @@ fully support the editing toolbar, but was found to be too confusing. dumpBackup.php * (bug 3595) Warn and abort if importDump.php called in read-only mode. * (bug 3598) Update message cache on message page deletion, patch by Tietew - +* Added separate newarticletext messages for logged in and anon users. === Caveats === diff --git a/includes/EditPage.php b/includes/EditPage.php index a18b06aa20..4590d439d3 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -385,7 +385,7 @@ class EditPage { } function showIntro() { - global $wgOut; + global $wgOut, $wgUser; $addstandardintro=true; if($this->editintro) { $introtitle=Title::newFromText($this->editintro); @@ -398,7 +398,10 @@ class EditPage { } } if($addstandardintro) { - $wgOut->addWikiText( wfMsg( 'newarticletext' ) ); + if ( $wgUser->getID() ) + $wgOut->addWikiText( wfMsg( 'newarticletext' ) ); + else + $wgOut->addWikiText( wfMsg( 'newarticletextanon' ) ); } } diff --git a/languages/Language.php b/languages/Language.php index ee3b63e637..fc927fec4f 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -703,6 +703,11 @@ Your IP address is $3. Please include this address in any queries you make. To create the page, start typing in the box below (see the [[Project:Help|help page]] for more info). If you are here by mistake, just click your browser's '''back''' button.", +'newarticletextanon' => +"You've followed a link to a page that doesn't exist yet. +To create the page, start typing in the box below +(see the [[Project:Help|help page]] for more info). +If you are here by mistake, just click your browser's '''back''' button.", 'talkpagetext' => '', 'anontalkpagetext' => "----''This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical [[IP address]] to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:Userlogin|create an account or log in]] to avoid future confusion with other anonymous users.'' ", 'noarticletext' => '(There is currently no text in this page)', -- 2.20.1